<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <!-- 计算小时和分钟 -->
    <input type="text" id="nam1" value="">
    <input type="text" id="nam2" value="">
    <input type="button" id="nam3" value="=">
    <input type="text" id="nam4" value="" >小时
    <input type="text" id="nam5" value="">分钟
    <script>
        nam3.onclick = function () {
            nam4.value = (parseInt((nam1.value) / (nam2.value)))
            nam5.value = ((nam1.value) % (nam2.value))
        } 
    </script>
    <!-- 温度转换 -->
    <div>
     
        摄氏温度<input type="button" id="nam8" value="=">
       <input type="text" id="nam9" value="">
       
        华氏温度<input type="button" id="na8" value="=">
        <input type="text" id="na9" value="">
    </div>
        <script>
   
  
        nam8.onclick = function () {
            nam9.value = (5/9.0*(80-32)).toFixed(3)
            na9.value=(80)
          
        } 
    </script>
    <!-- 
        计算器
     -->
     计算器<input type="text" id="nam10" value="">
     <select name="" id="fuhao">
         <option value="+">+</option>
         <option value="-">-</option>
         <option value="*">*</option>
         <option value="/">/</option>
         <option value="%">%</option>
     </select>
     <input type="text" id="nam11">
     <input type="button" value="="id="nam12">
     <input type="text" id="nam13">
     <script>
         nam12.onclick=function(){
             if(fuhao.value=='+')
             {
            nam13.value=(nam10.value*1+nam11.value*1);
             }
             if(fuhao.value=='-')
             {
            nam13.value=(nam10.value*1-nam11.value*1);
             }
             if(fuhao.value=='*')
             {
            nam13.value=(nam10.value*1*nam11.value*1);
             }
             if(fuhao.value=='/')
             {
            nam13.value=(nam10.value*1/nam11.value*1);
             }
             if(fuhao.value=='%')
             {
            nam13.value=(nam10.value*1%nam11.value*1);
             }
         }
     </script>

</body>

</html>